<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>{{TITLE}} - Wiki your code</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <link rel="stylesheet" href="/bootstrap.css" media="screen">
    <link rel="stylesheet" href="/custom.min.css">
    <link rel="stylesheet" type="text/css" href="/syntaxhighlighter-3.0.83/styles/shCoreEclipse.css">
    <link rel="stylesheet" type="text/css" href="/syntaxhighlighter-3.0.83/styles/shThemeEclipse.css">
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <a href="/index.md" class="navbar-brand">Code Wine</a>
            <p class="navbar-text">{{APPTITLE}}</p>
        </div>
        <form class="navbar-form navbar-right" role="search">
            <button id="refresh" type="button" class="btn btn-primary">更新项目注释</button>
        </form>
    </div>
</div>
<div class="container">
    <div class="row">
        <div class="col-lg-3" id="menuflat" style="padding-top: 80px">
            <h3>{{TITLE}}</h3><br>
            <ul class="nav nav-tabs">
                <li class="active"><a href="#home" data-toggle="tab">CONTENTS</a></li>
            </ul>
            <div id="myTabContent" class="tab-content">
                <div class="tab-pane fade active in" id="home" style="padding-left: 13px">
                    {% for key,val in KEYWORDS %}
                    <p><a href="#_{{key}}">{{val}} <span class="label label-primary">{{KEYWORDS_COUNT[key]}}</span></a></p>
                    {% endfor %}
                </div>
            </div>
        </div>
        <div class="col-lg-9">
            {% for data in CONTENTS %}
            <a name="_{{data.keyword}}"></a><p style="padding-top: 63px">&nbsp;</p>
            <h4><span class="badge">＠</span>&nbsp;
                {% if KEYWORDS[data.keyword] is not empty %}
                <span class="text-primary">{{KEYWORDS[data.keyword]}} </span>{{data.keyword}}
                {% endif %}
            </h4><br/>
            <p><span class="text-muted">in : </span><strong>{{data.filepath}}</strong><span
                    class="text-muted"> on line </span><strong>{{data.linenum}}</strong></p>
            <pre class="brush:php;first-line:[{{data.linenum - 9}}];highlight:[{{data.linenum}}]">
{{data.contents}}
</pre>
            <hr>
            {% endfor %}
        </div>
    </div>
    <footer>
        <div class="row">
            <div class="col-lg-12 text-right">
                <hr>
                filemtime : {{MODIFY}}
            </div>
        </div>

    </footer>
</div>
<script src="/jquery-1.10.2.min.js"></script>
<script src="/bootstrap.min.js"></script>
<script language="JavaScript">
    $(document).ready(function () {
        $(window).scroll(function () {
            if ($(this).scrollTop() > 1) {
                $("#menuflat").css({'top': $(this).scrollTop() + 'px', 'left': '0px'});
            } else {
                $("#menuflat").css({'top': '0px'});
            }
        });
        $("#refresh").click(function () {
            $("#refresh").text("Loading...");
            $("#refresh").unbind('click');
            $("#refresh").attr({"disabled": "disabled"});
            $.post("/wait/{{PRONAME}}", function (result) {
                if (result == "ok") {
                    window.location.reload();
                } else {
                    alert(result);
                }
            });
        });
    });
</script>
<script src="/syntaxhighlighter-3.0.83/src/shCore.js" type="text/javascript"></script>
<script src="/syntaxhighlighter-3.0.83/scripts/shBrushPhp.js" type="text/javascript"></script>
<script type="text/javascript">
    SyntaxHighlighter.defaults['toolbar'] = false;
    SyntaxHighlighter.all();</script>
</body>
</html>